{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "dbcca124",
   "metadata": {},
   "source": [
    "## 推送主分支"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "06ee77d9",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git config --global user.email \"lyhue1991@163.com\"\n",
    "# 出现一些类似 warning: LF will be replaced by CRLF in <file-name>. 可启用如下设置。\n",
    "!git config --global core.autocrlf false\n",
    "# 配置打印历史commit的快捷命令\n",
    "!git config --global alias.lg \"log --oneline --graph --all\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "74646c2b",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git init"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "aa131303",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git add -A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "61b75769",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!git pull origin master "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "9e7b346d-0298-44b1-9235-4a95769f0ea7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Unstaged changes after reset:\n",
      "M\t.gitignore\n",
      "M\t1-1,结构化数据建模流程范例.ipynb\n",
      "M\t1-2,图片数据建模流程范例.ipynb\n",
      "M\t1-3,文本数据建模流程范例.ipynb\n",
      "M\t1-4,时间序列数据建模流程范例.ipynb\n",
      "M\t2-1,张量数据结构.ipynb\n",
      "M\t2-2,自动微分机制.ipynb\n",
      "M\t2-3,动态计算图.ipynb\n",
      "M\t3-1,低阶API示范.ipynb\n",
      "M\t3-2,中阶API示范.ipynb\n",
      "M\t3-3,高阶API示范.ipynb\n",
      "M\t4-1,张量的结构操作.ipynb\n",
      "M\t4-2,张量的数学运算.ipynb\n",
      "M\t4-3,nn.functional和nn.Module.ipynb\n",
      "M\t5-1,Dataset和DataLoader.ipynb\n",
      "M\t5-2,模型层.ipynb\n",
      "M\t5-3,损失函数.ipynb\n",
      "M\t5-4,TensorBoard可视化.ipynb\n",
      "M\t6-1,构建模型的3种方法.ipynb\n",
      "M\t6-2,训练模型的3种方法.ipynb\n",
      "M\t6-3,使用GPU训练模型.ipynb\n",
      "M\t7-1,推荐算法业务.ipynb\n",
      "M\t7-2,广告算法业务.ipynb\n",
      "M\t7-3,FM模型.ipynb\n",
      "M\t7-4,DeepFM模型.ipynb\n",
      "M\t7-5,FiBiNET模型.ipynb\n",
      "M\t7-6,DeepCross模型.ipynb\n",
      "M\t7-7,DIN网络.ipynb\n",
      "M\t7-8,DIEN网络.ipynb\n",
      "M\tA-1,Kaggle免费GPU使用攻略.ipynb\n",
      "M\tA-2,Streamlit构建机器学习应用.ipynb\n",
      "M\tA-3,使用MacM1芯片加速pytorch.ipynb\n",
      "M\tREADME.md\n",
      "M\tpush-to-github.ipynb\n",
      "M\t一、Pytorch的建模流程.ipynb\n",
      "M\t七、Pytorch与广告推荐.ipynb\n",
      "M\t三、Pytorch的层次结构.ipynb\n",
      "M\t二、Pytorch的核心概念.ipynb\n",
      "M\t五、Pytorch的中阶API.ipynb\n",
      "M\t六、Pytorch的高阶API.ipynb\n",
      "M\t四、Pytorch的低阶API.ipynb\n"
     ]
    }
   ],
   "source": [
    "#!git reflog \n",
    "!git reset e8be8c24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "18e7aece",
   "metadata": {},
   "outputs": [],
   "source": [
    "#!rm -rf *.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "4abc318a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[master dc53aa0c] update torchkeras\n",
      " 47 files changed, 109199 insertions(+), 29201 deletions(-)\n",
      " create mode 100644 \"5-2,\\346\\250\\241\\345\\236\\213\\345\\261\\202.md\"\n",
      " create mode 100644 \"7-6,DeepCross\\346\\250\\241\\345\\236\\213.md\"\n",
      " create mode 100644 \"A-1,Kaggle\\345\\205\\215\\350\\264\\271GPU\\344\\275\\277\\347\\224\\250\\346\\224\\273\\347\\225\\245.md\"\n",
      " create mode 100644 \"\\344\\270\\200\\343\\200\\201Pytorch\\347\\232\\204\\345\\273\\272\\346\\250\\241\\346\\265\\201\\347\\250\\213.md\"\n",
      " create mode 100644 \"\\344\\270\\203\\343\\200\\201Pytorch\\344\\270\\216\\345\\271\\277\\345\\221\\212\\346\\216\\250\\350\\215\\220.md\"\n",
      " create mode 100644 \"\\344\\272\\224\\343\\200\\201Pytorch\\347\\232\\204\\344\\270\\255\\351\\230\\266API.md\"\n"
     ]
    }
   ],
   "source": [
    "!git commit -m \"update torchkeras\" "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "64ef63cd",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git log "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "33a96283",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote add origin git@github.com:lyhue1991/eat_pytorch_in_20_days.git"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e123d99b",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote remove origin "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "60bb0e8d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enumerating objects: 7, done.\n",
      "Counting objects: 100% (7/7), done.\n",
      "Delta compression using up to 8 threads\n",
      "Compressing objects: 100% (4/4), done.\n",
      "Writing objects: 100% (4/4), 1.18 KiB | 1.18 MiB/s, done.\n",
      "Total 4 (delta 3), reused 0 (delta 0), pack-reused 0\n",
      "remote: Resolving deltas: 100% (3/3), completed with 3 local objects.\u001b[K\n",
      "To github.com:lyhue1991/eat_pytorch_in_20_days.git\n",
      "   fd9242b5..e8be8c24  master -> master\n"
     ]
    }
   ],
   "source": [
    "!git push origin master "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bc00e253",
   "metadata": {},
   "outputs": [],
   "source": [
    "!ssh -T git@github.com:lyhue1991/eat_pytorch_in_20_days.git"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "53ad6321",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote rm gitee "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d5ef1678",
   "metadata": {},
   "outputs": [],
   "source": [
    "!git remote add gitee https://gitee.com/Python_Ai_Road/eat_pytorch_in_20_days"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "a95d42b7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enumerating objects: 7, done.\n",
      "Counting objects: 100% (7/7), done.\n",
      "Delta compression using up to 8 threads\n",
      "Compressing objects: 100% (4/4), done.\n",
      "Writing objects: 100% (4/4), 1.18 KiB | 1.18 MiB/s, done.\n",
      "Total 4 (delta 3), reused 0 (delta 0), pack-reused 0\n",
      "remote: Powered by \u001b[01;33mGITEE.COM \u001b[0m[\u001b[01;35mGNK-6.4\u001b[0m]\u001b[0m\u001b[K\n",
      "To https://gitee.com/Python_Ai_Road/eat_pytorch_in_20_days\n",
      "   fd9242b5..e8be8c24  master -> master\n"
     ]
    }
   ],
   "source": [
    "!git push   gitee master "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "69928150-d226-4b8a-9cd5-46ce48b0e7cd",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "df3e49de",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Overwriting .gitignore\n"
     ]
    }
   ],
   "source": [
    "%%writefile .gitignore\n",
    ".DS_store\n",
    ".ipynb_checkpoints\n",
    ".ipynb_checkpoints/* \n",
    "__pycache__/*\n",
    "eat_pytorch_datasets\n",
    "*.pt\n",
    "data/*.pt \n",
    "data/*.zip\n",
    "data/*.pkl\n",
    "data/tensorboard\n",
    "data/mnist \n",
    "mnist\n",
    "*.png\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9458fc79",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "encoding": "# -*- coding: utf-8 -*-",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
